-
Notifications
You must be signed in to change notification settings - Fork 0
🚀[Feature]: Test Setup & Teardown Support for GitHub Actions Workflows #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
…tation Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
…tecture Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
…e detection logic Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
…g workflows Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
- Implemented `setup-plan.ps1` to create an implementation plan for features, including JSON output option and template handling. - Developed `update-agent-context.ps1` to update agent context files based on `plan.md`, supporting multiple agent types and ensuring environment validation. - Created templates for agent files and implementation plans to standardize documentation and facilitate easier updates. - Introduced a comprehensive feature specification template to guide feature development and ensure clarity in requirements. - Added a task template to streamline task generation for feature implementation, ensuring proper sequencing and dependencies.
…nce and requirements
…omated publishing process
…manage BeforeAll/AfterAll test scripts
- Introduced quickstart.md for validating setup-test composite action functionality. - Included prerequisites, integration steps, validation checklist, and test scenarios. - Documented expected outcomes and debug commands for ease of use. --- feat: Document research findings for local GitHub composite action - Created research.md consolidating decisions on composite action structure, error handling, and integration patterns. - Outlined rationale for using a single action with mode parameter for BeforeAll and AfterAll scripts. - Provided implementation guidance and technical decisions summary. --- feat: Define tasks for implementing local GitHub composite action - Established tasks.md outlining execution flow, task dependencies, and phases for implementation. - Specified tasks for setup, testing, core implementation, integration, and polish. - Included validation checklist to ensure all requirements are met before execution.
… external resource management
…intended use and provide examples for managing external test resources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces test setup and teardown capability for PowerShell modules through a comprehensive enhancement to the Process-PSModule framework. The main purpose is to enable test infrastructure setup and cleanup scripts that can run before and after test matrix jobs across all platforms.
Key changes include:
- Addition of BeforeAll.ps1 and AfterAll.ps1 test scripts that execute automatically during test workflows
- Enhanced Test-ModuleLocal.yml workflow with dedicated setup and teardown jobs
- Complete feature specification and implementation plan with contracts and documentation
- Updated README with comprehensive documentation of the new test setup capabilities
Reviewed Changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/srcWithManifestTestRepo/tests/MyTests/BeforeAll.ps1 | Example BeforeAll setup script for MyTests directory |
| tests/srcWithManifestTestRepo/tests/MyTests/AfterAll.ps1 | Example AfterAll teardown script for MyTests directory |
| tests/srcWithManifestTestRepo/tests/Environments/BeforeAll.ps1 | Example BeforeAll setup script for Environments directory |
| tests/srcWithManifestTestRepo/tests/Environments/AfterAll.ps1 | Example AfterAll teardown script for Environments directory |
| tests/srcTestRepo/tests/BeforeAll.ps1 | Main BeforeAll setup script with comprehensive setup tasks |
| tests/srcTestRepo/tests/AfterAll.ps1 | Main AfterAll teardown script with comprehensive cleanup tasks |
| .github/workflows/Test-ModuleLocal.yml | Enhanced workflow with BeforeAll-ModuleLocal and AfterAll-ModuleLocal jobs |
| .github/workflows/workflow.yml | Updated to pass ModuleTestSuites instead of matrix parameters |
| .github/workflows/CI.yml | Updated to pass ModuleTestSuites instead of matrix parameters |
| README.md | Added comprehensive documentation for setup and teardown scripts |
| specs/001-building-on-this/* | Complete feature specification and implementation artifacts |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 35 out of 35 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 37 out of 37 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
tests/srcWithManifestTestRepo/tests/BeforeAll.ps1:1
- The final message says 'AFTERALL SETUP SCRIPT' but should say 'BEFOREALL SETUP SCRIPT' to match the script's purpose.
Write-Host "=== BEFOREALL SETUP SCRIPT (Environments) EXECUTING ==="
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…n up the media directory.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 39 out of 39 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
… removing redundant directory search logic
…ocess-PSModule into 001-building-on-this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 39 out of 39 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…values for improved flexibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 39 out of 39 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…ub composite action for BeforeAll/AfterAll test scripts as part of project restructuring. This includes the deletion of research.md, spec.md, and tasks.md files, consolidating the documentation and streamlining the development process.
…eAll and AfterAll scripts for cleaner execution flow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 30 out of 30 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Overview
This release introduces automated test environment management through
BeforeAll.ps1andAfterAll.ps1scripts, enabling comprehensive setup and teardown capabilities for module tests running in GitHub Actions. This enhancement solves the challenge of managing complex test environments (databases, infrastructure, external services) across parallel test matrices while ensuring proper cleanup regardless of test outcomes.🎯 Main Feature: Test Lifecycle Management
The Problem
Previously, setting up test infrastructure required:
The Solution
Dedicated setup and teardown jobs with automatic script execution:
Configuration
No configuration needed! Simply add scripts to your test directory.
The workflow automatically detects and executes these scripts when present.
Additional: Specification-Driven Development Framework
This release also includes an implementation of spec-kit principles, adding a structured workflow for feature development from specification through implementation.
What's Included
.github/prompts/) for/specify,/clarify,/plan,/tasks,/analyze,/implementcommands.specify/memory/constitution.md) defining architectural principles:Additional Workflow Improvements
Linter Configuration Updates
VALIDATE_BIOME_FORMAT: falsefor Biome formatterVALIDATE_GITHUB_ACTIONS_ZIZMOR: falsefor workflow security scanningVALIDATE_JSCPD: falsefor copy-paste detectionTest Workflow Enhancements
OSNamevsOS)Documentation